package com.thomas.thread;


/**   
* @Description: This引用逸出示例 
* @author thomas_liu  
* @date 2018年5月11日 下午11:34:32 
* @version V1.0   
*/
public class ThisEscape {
	
	public final int id;
	
	public final String name;

	public ThisEscape(EventSource<EventListener> source) {
		super();
		
		id =1;
		source.registerListener(new EventListener(){

			public void onEvent(Object object) {
				System.out.println("id: "+ThisEscape.this.id);
				System.out.println("name: "+ThisEscape.this.name);
			}
		});
		
		try {  
			Thread.sleep(1000); // 调用sleep模拟其他耗时的初始化操作  
		} catch (InterruptedException e) {  
			// TODO Auto-generated catch block 
			e.printStackTrace();  
		}  
		name = "flysqrlboy";
	}
	
	
}
